import request from '@/utils/http/request_product';
import { TrademarkListModel, res } from './model/trademark';

// 请求品牌分页列表
export const getTrademarkPageListApi = (page: number, limit: number) => {
  return request.get<any, res>(`/admin/product/baseTrademark/${page}/${limit}`);
};

// 添加品牌
export const saveTrademarkApi = (tmName: string, logoUrl: string) => {
  return request.post<any, any>(`/admin/product/baseTrademark/save`, {
    tmName: tmName,
    logoUrl: logoUrl,
  });
};

// 修改品牌
export const updateTrademarkApi = (
  id: number,
  tmName: string,
  logoUrl: string
) => {
  return request.put<any, any>(`/admin/product/baseTrademark/update`, {
    id: id,
    tmName: tmName,
    logoUrl: logoUrl,
  });
};

// 删除品牌
export const deleteTrademarkApi = (id: number) => {
  return request.delete<any, any>(`/admin/product/baseTrademark/remove/${id}`);
};
